//
//  UploadImage.h
//  YuErmuYing
//
//  Created by Tiancheng on 16/9/1.
//  Copyright © 2016年 Tiancheng. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "AFHTTPSessionManager.h"

@interface UploadImage : NSObject
//上传单张图片
-(void) uploadImage:(UIImage *) image Parameter:(NSDictionary *)parameter FileName:(NSString *)fileName MimeType:(NSString *)mimetype UrlStr:(NSString *)urlStr;
//上传带图片的内容

/**
 *  上传带图片的内容，允许多张图片上传（URL）POST
 *
 *  @param url                 网络请求地址
 *  @param images              要上传的图片数组（注意数组内容需是图片）
 *  @param parameter           图片数组对应的参数
 *  @param parameters          其他参数字典
 *  @param ratio               图片的压缩比例（0.0~1.0之间）
 *  @param succeedBlock        成功的回调
 *  @param failedBlock         失败的回调
 *  @param uploadProgressBlock 上传进度的回调
 */
//另一种方法上传(单张图片)
- (NSURLSessionUploadTask*)uploadTaskWithImage:(UIImage*)image URLString:(NSString *)urlString Parameters:(NSDictionary*)parameters completion:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionBlock;
//上传多张图片
-(void)uploadTaskWithMoreImages:(NSMutableArray *)imageArray URLString:(NSString *)urlString Parameters:(NSDictionary*)parameters;

-(void)uploadMoreImages:(NSArray *)imageArray Parameter:(NSDictionary *)parameter FileName:(NSString *)fileName MimeType:(NSString *)mimetype UrlStr:(NSString *)urlStr;

-(void) uploadImageArray:(NSArray *) imageArray Parameter:(NSDictionary *)parameter ParamName:(NSString *)paramName FileName:(NSString *)fileName MimeType:(NSString *)mimetype UrlStr:(NSString *)urlStr;

@end
